package com.jirong.shop.service;

import com.jirong.shop.pojo.TUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jirong.shop.vo.LoginVo;
import com.jirong.shop.vo.RespBean;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jirong
 * @since 2022-01-13
 */
public interface TUserService extends IService<TUser> {
    /**
     * 登录
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据cookie获取存在redis中的用户
     * @param userTicket
     * @param request
     * @param response
     * @return
     */

    TUser getUserByCookie(String userTicket, HttpServletRequest request, HttpServletResponse response);

    /**
     *  跟新密码，进行对象缓存
     * @param userTicket
     * @param id
     * @param password
     * @return
     */
    RespBean updatePassword(String userTicket,Long id,String password);
}
